package students_files_test01;

public class Product {
    private String code;
    private String description;
    private Double price;

    public Product(String initialCode,String initialDescription,Double initialPrice){
        this.code = initialCode;
        this.description = initialDescription;
        this.price = initialPrice;
    }

    public String getCode(){
        return this.code;
    }

    public String getDescription() {
        return description;
    }

    public Double getPrice() {
        return price;
    }

    @Override
    public boolean equals(Object object){
        Product product = (Product) object;
        if (this.code != product.getCode()) {
            return false;
        }
        return true;
    }

    @Override
    public String toString(){
        return this.code + "_" + this.getDescription() + "_" + this.getPrice();
    }
}
